ExecuteNonQuery Method:
This method is commonly used for update, insert and delete statements, where the only returned value is the number of record affected.
Namespace: System.Data.SqlClient
Assembly: System.Data (in System.Data.dll)
Return Value Type: System.Int32
ExecuteReader Method:
This method executes the command and returns a typed data reader object, depending on the provider is used. The object returned can be used to iterate through the record(s) returned.
Namespace: System.Data.SqlClient
Assembly: System.Data (in System.Data.dll)
Return Value Type: System.Data.SqlClient.SqlDataReader
ExecuteScalar Method:
Execute the command and return a single value. On many occasions, it is necessary to return a single result from a SQL statement, such as the count of records in a given table, or the current data time of the server.
Namespace: System.Data.SqlClient
Assembly: System.Data (in System.Data.dll)
Return Value Type: System.Object
Anonymous User
04-Jul-2019Thank You for the informative post.